﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MusicOnLine.Common;
using MusicOnLine.Models;

namespace MusicOnLine.Controllers
{
    public class TestController : Controller
    {
        MusicPlayEntities db = new MusicPlayEntities();
        //
        // GET: /Test/

        public ActionResult Index()
        {
            SelectList list = new SelectList(Common.Common.GetGenre(),"genre","genre");
            ViewBag.GenreList = list;
            return View();
        }

        public ActionResult ArtistList()
        {
            var mode = db.Artists.ToList();
            return View(mode);
        }

        protected override void Dispose(bool disposing)
        {
            db.Dispose();
            base.Dispose(disposing);
        }
    }
}
